import { Meta, Story, Props, Canvas } from '@storybook/addon-docs/blocks'
import { config, withDesign } from 'storybook-addon-designs'
import { action } from '@storybook/addon-actions'

import ButtonAdd from '@baserow/modules/core/components/ButtonAdd'

<Meta
    title="Baserow/Buttons/Add"
    component={ButtonAdd}
    decorators={[withDesign]}
    argTypes={{
        disabled: {
            control: {
                type: 'boolean',
                options: [true, false],
            },
            defaultValue: false,
        },
    }}
/>

# Button add

The button add component is a button that can be used to add something, for exemple a new row.

export const Template = (args, { argTypes }) => ({
    components: { ButtonAdd },
    props: Object.keys(argTypes),
    template: `<ButtonAdd v-bind="$props"></ButtonAdd>`,
})

export const designConfig = {
    type: 'figma',
    url: 'https://www.figma.com/file/W7R2rQW7ohsZMeHRfEcPFW/Design-Library?type=design&node-id=1-85&mode=design&t=ZFKwI59cTYQROI8S-0',
}

<Canvas>
    <Story
        name="Default"
        parameters={{
            design: config(designConfig),
        }}
    >
        {Template.bind({})}
    </Story>
</Canvas>

## Example

```javascript
<ButtonAdd></ButtonAdd>
```

## Props

<Props of={ButtonAdd} />
